#!/usr/bin/env python
# coding: utf-8

# 计算给定数`n`的阶乘（$n!=n\times(n-1)\times...\times2\times1$）
#
# 输入：整数`n=8`
#
# 预期输出：`40320`

# In[1]:


n = 8
def shortFact(x):
    return 1 if x <= 1 else x * shortFact(x - 1)
print(shortFact(n))

